﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Windows.Media;
using System.Reflection;


namespace SimpleBomberman
{
    public partial class InitialForm : Form
    {
        public int CurrentLevelIndex;

        public InitialForm()
        {
            InitializeComponent();
        }
        public InitialForm(int count)
        {
            InitializeComponent();
            this.CurrentLevelIndex = count;
            for (int i = 0; i < CurrentLevelIndex; i++)
            {
                comboBox1.Items.Add(i + 1);
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (comboBox1.Text != "")
            {
                this.Visible = false;
            }
            else
            {
                MessageBox.Show("Please choose level!");
            }              
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.CurrentLevelIndex = int.Parse(comboBox1.Text);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            InstructionForm form4 = new InstructionForm();
            form4.Show();
        }
    }
}
